STEP 5: Let's make the roads look a little more like roads!

  • Change the width argument of the rectangle in the loop from 100 to 500.
  • Change the rectangle's color argument from "blue" to "gray". Click Run to see all the roads to cross!
  • Go to the toolkit. Drag out Sprite at Position to the bottom of the program.
  • Make sure it is not indented! We'll turn this sprite into our player sprite in the next activity.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# sprite = codesters.Rectangle(x, y, width, height, "color") start = codesters.Rectangle(0, -250, 500, 50, "red") # sprite = codesters.Rectangle(x, y, width, height, "color") finish = codesters.Rectangle(0, 250, 500, 50, "green") my_list = [-150, -50, 50, 150] for value in my_list: pass # delete after adding indented code # add code here # sprite = codesters.Rectangle(x, y, width, height, "color") sprite = codesters.Rectangle(0, value, 100, 50, "blue")
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)